import { Checkbox } from 'antd';
import type { CheckboxGroupProps } from 'antd/es/checkbox';
import { useTradeData } from './useTradeData';

export function TradeSelectFlat(props: CheckboxGroupProps) {
  const { data = [] } = useTradeData();
  return (
    <Checkbox.Group {...props}>
      {data.map((v) => {
        return (
          <Checkbox key={v.value} value={v.value}>
            {v.label}
          </Checkbox>
        );
      })}
    </Checkbox.Group>
  );
}
